﻿/*----------------------------------------------------------------
// Copyright (C) 2016 通通优品版权所有。
// 命名空间: TongTongMall.MallWeb.Core.Entity
// 类名：UserLoginRecord
// 功能描述：N/A
// 
// 创建标识：Roc.Lee(李鹏鹏) 2017/8/29 16:26:03 TEC-ROCLEE Roc.Lee

// 修改标识：
// 修改描述：
// 
//
//----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using TongTongMall.Domain.Entities;
using TongTongMall.Domain.Repositories.Attributes;
using TongTongMall.MallWeb.Core.User.Models;
using TongTongMall.Timing;

namespace STOWaybillMall.Core
{
    [Table("UserLoginRecord")]
    public partial class UserLoginRecord : AggregateRoot<long>
    {
        public UserLoginRecord() { }
        public UserLoginRecord(VisitPlatformEnum? _VisitPlatform, LoginStatusEnum _LoginStatus, LoginTypeEnum? _LoginType, string _IP, long _UserID)
        {
            AddDate = Clock.Now;
            this.VisitPlatform = _VisitPlatform;
            this.LoginStatus = _LoginStatus;
            this.LoginType = _LoginType;
            this.IP = _IP;
            this.UserID = _UserID;
        }

        [Identify]
        public long RecordID { get; private set; }

        public DateTime AddDate { get; private set; }

        public VisitPlatformEnum? VisitPlatform { get; set; }

        public LoginStatusEnum LoginStatus { get; set; }

        //[StringLength(64)]
        public string IP { get; set; }

        public int? StayTime { get; set; }

        //[DatabaseGenerated(DatabaseGeneratedOption.None)]
        public long UserID { get; set; }

        public string OtherDetail { get; set; }

        public string URI { get; set; }
        public string Description { get; set; }

        public LoginTypeEnum? LoginType { get; set; }

        public long? TenantID { get; set; }
    }
}
